package jdk7.stringinswtich;


/**
 * Description: jdk1.7新特性：Switch语句支持String类型（String in Switch)
 * switch中可以使用string字符串了
 * 
 * 个人认为：很有用呀，原来之前只能是数字的，很有用这个东西
 * @author Kwum
 * @date 2017年6月26日 下午3:29:45
 * @version 1.0
 */

public class Run {

    public static void main(String[] args) {
        
        String day = "Monday";
        
        switch(day){
            case "Monday":
                System.out.println("Today is Monday");
                break;
            case "Tuesday":
                System.out.println("Today is Tuesday");
                break;
            case "Wednesday":
                System.out.println("Today is Wednesday");
                break;
            case "Thursday":
                System.out.println("Today is Thursday");
                break;
            case "Friday":
                System.out.println("Today is Friday");
                break;
            case "Saturday":
                System.out.println("Today is Saturday");
                break;
            case "Sunday":
                System.out.println("Today is Sunday");
                break;
            default:
                System.out.println("Not today.");
                break;
        }
    }

}
